package first;

import java.awt.BorderLayout;
import java.awt.Checkbox;
import java.awt.CheckboxGroup;
import java.awt.Frame;
import java.awt.Panel;

public class CheckDemo extends Frame{
	CheckDemo(String title) {
		super(title);
		Checkbox cb1=new Checkbox("Married");
		Checkbox cb2=new Checkbox();
		cb2.setLabel("Single");
		cb2.setState(true);
		Panel p1=new Panel();
		p1.add(cb1);
		p1.add(cb2);
		CheckboxGroup cbg=new CheckboxGroup();
		Checkbox c1=new Checkbox("Left Justify",true,cbg);
		Checkbox c2=new Checkbox("Center Justify",false,cbg);
		Checkbox c3=new Checkbox("Right Justify",false,cbg);
		Panel p2=new Panel();
		p2.add(c1);
		p2.add(c2);
		p2.add(c3);
		add(p1,BorderLayout.CENTER);
		add(p2,BorderLayout.SOUTH);
		setSize(400,400);
		setVisible(true);
		
	}
	
	
	 public static void main(String[] args)
	 { CheckDemo chd=new CheckDemo("check");
	
	 }


	

}
